<template>
<div class="yixiangall">
    <YiXiangTopVue></YiXiangTopVue>
      <div class="yixiangcontent">
      <div class="yixiang">
          <span style="margin-right:.8rem">*意向职位</span>
          <span @click="getzhiwei" v-html="objs.zhiwei==''?'请输入意向职位':objs.zhiwei" style="color:#ccc;margin-right: .2rem;
          overflow: hidden;text-overflow: ellipsis;white-space: nowarp;width: 2.8rem;height: .8rem;"></span>
          <span style="float:right" class="iconfont icon-zengjia"></span>
      </div>
       <div class="yixiang">
          <span style="margin-right:.8rem">*意向地区</span>
          <span @click="getcitybox" v-html="objs.cityss==''?'请输入意向地区':objs.cityss" style="color:#ccc;margin-right: .2rem;
          overflow: hidden;text-overflow: ellipsis;white-space: nowarp;width: 2.8rem;height: .8rem;"></span>
          <span style="float:right" class="iconfont icon-zengjia"></span>
      </div>
       <div class="yixiang">
          <span style="margin-right:.8rem">*求职状态</span>
            <select v-model.trim="zhuangtai" style="width:3.5rem" name="" id="" value="">
                <option value=" " style="display:none" selected disabled></option>
                <option value="离职，可随时到岗">离职，可随时到岗</option>
                <option value="在职，正在找工作">在职，正在找工作</option>
                <option value="目前不考虑换工作">目前不考虑换工作</option>
                <option value="在职，有好机会可考虑">在职，有好机会可考虑</option>
                <option value="应届毕业生">应届毕业生</option>
            </select>
          <span style="float:right" class="iconfont icon-zengjia"></span>
      </div>
       <div class="yixiang">
          <span style="margin-right:.8rem">*求职类型</span>
           <select v-model.trim="leixin" style="width:3.5rem" name="" id="" value="">
                <option value=" " style="display:none" selected disabled></option>
                <option value="全职">全职</option>
                <option value="多点执业">多点执业</option>
                <option value="个体执业">个体执业</option>
                <option value="私人医护">私人医护</option>
            </select>
          <span style="float:right" class="iconfont icon-zengjia"></span>
      </div>
       <div class="yixiang">
          <span style="margin-right:.8rem">*到岗时间</span>
           <select v-model="gotime" style="width:3.5rem" name="" id="" value="">
                <option value=" " style="display:none" selected disabled></option>
                <option value="随时到岗">随时到岗</option>
                <option value="两周内">两周内</option>
                <option value="一个月内">一个月内</option>
                <option value="面议">面议</option>
            </select>
          <span style="float:right " class="iconfont icon-zengjia"></span>
      </div>
       <div class="yixiang">
          <span style="margin-right:.8rem">*期望月薪</span>
          <input v-model.trim="wantmonthmoney" style="color:#ccc" placeholder="请输入期望月薪">元
          <!-- <span style="float:right" class="iconfont icon-zengjia"></span> -->
      </div>
       <div class="yixiang">
          <span style="margin-right:.8rem">*期望年薪</span>
          <input v-model.trim="wantyearmoney" style="color:#ccc" placeholder="请输入期望年薪">万
          <!-- <span style="float:right" class="iconfont icon-zengjia"></span> -->
      </div>
       <div class="yixiang">
          <span style="margin-right:.8rem">*目前月薪</span>
          <input v-model.trim="nowmonthmoney" style="color:#ccc" placeholder="请输入目前月薪">元
          <span style="float:right" class="iconfont icon-zengjia"></span>
      </div>
       <div class="yixiang">
          <span style="margin-right:.8rem">*目前年薪</span>
          <input v-model.trim="nowyearmoney"  style="color:#ccc" placeholder="请输入目前月薪">万
          <span style="float:right" class="iconfont icon-zengjia"></span>
      </div>
      <div class="sumbit">
            <el-popover
            placement="bottom"
            title="保存成功"
            width="200"
            trigger="click"
            content="">
    <el-button slot="reference" @click="sumbit">保存</el-button>
    
  </el-popover>
  <p style="font-size:.3rem">完善附件信息能提高成功率，去上传简历附件</p>
      </div>
  </div>
  <XuanZeDiQuVue v-if="getcitybox"></XuanZeDiQuVue>
  <XuanZeZhiWeiVue v-if="getzhiwei"></XuanZeZhiWeiVue>
</div>
</template>

<script>
import { mapState,mapMutations } from 'vuex'
import XuanZeZhiWeiVue from './XuanZeZhiWei.vue'
import XuanZeDiQuVue from './XuanZeDiQu.vue'
import YiXiangTopVue from './YiXiangTop.vue'
export default {
    data(){
        return{
            
           zhuangtai:'', //在职状态
           leixin:"",//在职类型
           gotime:'',//到岗时间
           wantmonthmoney:'',//期望月薪
           wantyearmoney:"",//期望年薪
           nowmonthmoney:"",//目前月薪
           nowyearmoney:'',//目前年薪
        }
    },
    components:{
        YiXiangTopVue,
        XuanZeDiQuVue,
        XuanZeZhiWeiVue,

    },
    methods:{
        ...mapMutations(["fn3",'fn5','setData']),
        getcitybox(){
           this.fn3()
        },
        getzhiwei(){
            this.fn5()
        },
      async sumbit(){
            // let arr = [this.zhuangtai,this.leixin,this.gotime,
            // this.wantmonthmoney,this.wantyearmoney,this.nowmonthmoney,this.nowyearmoney];
            // // console.log(arr);
            // this.$store.commit("setData",arr);
            let {data} =await this.$http({
            url:"http://192.168.58.87:8080/userdata/"+this.id,
            method:"patch",
            data:{
                cityss: this.objs.cityss,
                zhiwei: this.objs.zhiwei,
                zhuangtai: this.zhuangtai,
                leixin: this.leixin,
                gotime: this.gotime,
                wantmonthmoney: this.wantmonthmoney,
                wantyearmoney: this.wantyearmoney,
                nowmonthmoney: this.nowmonthmoney,
                nowyearmoney: this.nowyearmoney,
            }
    })
     this.$store.commit("setData",data);
        setTimeout(()=>{
            this.$router.push("/resume")
        },1000)
        }
        
    },
    computed:{
        ...mapState(["citybox",'zhiwei',"objs",'mycitys','myzhiwei',"id"])
    }
}
</script>

<style>
.yixiangall{
    width: 100%;
    height: 100%;
    padding-top: 1rem;
}
.yixiang{
    justify-content: start;
    align-items: center;
    display: flex;
    font-size: .4rem;
    width: 100%;
    height: .8rem;
    background-color: white;
    text-align: left;
    line-height: .8rem;
    padding: 0rem .5rem;
    margin-bottom: .2rem;
}
.yixiang>input{
    width: 2.9rem;
    margin-right: .2rem;
    outline: none;
    border: 0;
}
.sumbit{
    width: 100%;
    height: 2rem;
    padding-left: 1rem;
}
.el-button{
    width: 80%;
    height: 1rem;
    color: white;
    font-size: .5rem;
    font-weight: 700;
    border-radius: .5rem;
    background-color: brown;
    margin-bottom: .2rem;
}
</style>